﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace Dabr.NET.OAuth
{
    public abstract class OAuthSignatureMethod
    {
        /// <summary>
        /// Returns the name of the signature method for the class. (ie. HMAC-SHA1)
        /// </summary>
        /// <returns>Signature method expressed in a String.</returns>
        abstract public string SignatureMethod { get; }
        abstract public string BuildSignature(OAuthRequest request, OAuthConsumer consumer, OAuthToken token);
        public bool IsValidSignature(OAuthRequest request, OAuthConsumer consumer, OAuthToken token, string signature)
        {
            return BuildSignature(request, consumer, token) == signature;
        }
    }
}